/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author FIRE
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface UserOrderScope extends BasicModel<UserOrderScope> {
  userCode?: string; // 用户ID
  scopeType?: string; // 权限类型
}

export const userOrderScopeList = (params?: UserOrderScope | any) =>
  defHttp.get<UserOrderScope>({ url: adminPath + '/srm/scope/userOrderScope/list', params });

export const userOrderScopeListData = (params?: UserOrderScope | any) =>
  defHttp.post<Page<UserOrderScope>>({ url: adminPath + '/srm/scope/userOrderScope/listData', params });

export const userOrderScopeForm = (params?: UserOrderScope | any) =>
  defHttp.get<UserOrderScope>({ url: adminPath + '/srm/scope/userOrderScope/form', params });

export const userOrderScopeSave = (params?: any, data?: UserOrderScope | any) =>
  defHttp.postJson<UserOrderScope>({ url: adminPath + '/srm/scope/userOrderScope/save', params, data });

export const userOrderScopeDelete = (params?: UserOrderScope | any) =>
  defHttp.get<UserOrderScope>({ url: adminPath + '/srm/scope/userOrderScope/delete', params });
